package com.monster.pojo;

import java.util.ArrayList;
import java.util.Objects;

/**
 * 歌曲类，包含对应song表的各属性和getter、setter方法
 * @author cyb
 */
public class Song {
    private Long songId;     // 歌曲id
    private String songName;     // 歌名
    private String language;     // 语种
    private String genre;       // 流派
    private String publicTime;      // 发行时间
    private String url;     // 歌曲url
    private String lyric;       // 歌词url
    private String time;        // 时长
    private String poster;      // 海报
    private String profile;     // 简介
    private Album album = new Album();        // 专辑
    private ArrayList<Singer> singers;      // 歌手集合
    private ArrayList<Playlist> playlist;       // 歌单集合

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Song song = (Song) o;
        return Objects.equals(songId, song.songId) &&
                Objects.equals(songName, song.songName) &&
                Objects.equals(time, song.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(songId, songName, time);
    }

    @Override
    public String toString() {
        return "Song{" +
                "id=" + songId +
                ", name='" + songName + '\'' +
                ", language='" + language + '\'' +
                ", genre='" + genre + '\'' +
                ", publicTime='" + publicTime + '\'' +
                ", lyric='" + lyric + '\'' +
                ", time='" + time + '\'' +
                ", poster='" + poster + '\'' +
                ", album=" + album +
                ", singers=" + singers +
                ", playlist=" + playlist +
                '}';
    }

    public String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        this.profile = profile;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public ArrayList<Singer> getSingers() {
        return singers;
    }

    public void setSingers(ArrayList<Singer> singers) {
        this.singers = singers;
    }

    public ArrayList<Playlist> getPlaylist() {
        return playlist;
    }

    public void setPlaylist(ArrayList<Playlist> playlist) {
        this.playlist = playlist;
    }

    public Long getSongId() {
        return songId;
    }

    public void setSongId(Long id) {
        this.songId = id;
    }

    public String getSongName() {
        return songName;
    }

    public void setSongName(String songName) {
        this.songName = songName;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getGenre() {
        return genre;
    }

    public void setGenre(String genre) {
        this.genre = genre;
    }

    public String getPublicTime() {
        return publicTime;
    }

    public void setPublicTime(String publicTime) {
        this.publicTime = publicTime;
    }

    public String getLyric() {
        return lyric;
    }

    public void setLyric(String lyric) {
        this.lyric = lyric;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getPoster() {
        return poster;
    }

    public void setPoster(String poster) {
        this.poster = poster;
    }

    public Album getAlbum() {
        return album;
    }

    public void setAlbum(Album album) {
        this.album = album;
    }

    public Song() {}

}
